using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_UNITCONVERTER.
    /// </summary>
    public class QT_UNITCONVERTER
    {
              private string _ID1;
      private string _ID2;
      private double _Number;
      private string _IDPOS;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID1; 
      public bool IsID1Nullable   
      { 
	 get { return false;  } 
      }
      public string ID1
      {
         get { return _ID1; }
         set 
	    { 
 		 _ID1 = value;
		IsSetID1 = true;
 	    }
      }
      public bool IsSetID2; 
      public bool IsID2Nullable   
      { 
	 get { return false;  } 
      }
      public string ID2
      {
         get { return _ID2; }
         set 
	    { 
 		 _ID2 = value;
		IsSetID2 = true;
 	    }
      }
    public bool IsSetNumber; 
    public bool IsNumberNullable   
    { 
		get { return false;  } 
    }
    public double Number
    {
        get{ return _Number;  }
        set
		{
			_Number = value;
			IsSetNumber = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }

        #endregion

        #region Constructors
        public QT_UNITCONVERTER()
        {
            Reset();
        }
        public QT_UNITCONVERTER(QT_UNITCONVERTER obj)
        {
            	this._ID1 = obj.ID1;
	this._ID2 = obj.ID2;
	this._Number = obj.Number;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _ID1 = EmptyValues.v_string;
         _ID2 = EmptyValues.v_string;
         _Number = EmptyValues.v_double;
         _IDPOS = EmptyValues.v_string;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID1"] is DBNull))
		{
			obj.ID1 = (string)reader["ID1"];
		}
                if(!(reader["ID2"] is DBNull))
		{
			obj.ID2 = (string)reader["ID2"];
		}
                if(!(reader["Number"] is DBNull))
		{
			obj.Number = (double)reader["Number"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _ID1 = (reader["ID1"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ID1"];
//            _ID2 = (reader["ID2"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ID2"];
//            _Number = (reader["Number"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["Number"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string ID1, string ID2, double Number, string IDPOS)
        {
                     this._ID1 = ID1;
         this._ID2 = ID2;
         this._Number = Number;
         this._IDPOS = IDPOS;
        }
    }
}